#pragma once

#include "stdafx.h"
#include "point.h"
#include "vector3.h"
#include "renderoptions.h"
#include "scene.h"
#include "picture.h"
#include "intersection.h"

class camera
{
public:

	point camPosition;
	point gridPosition;

	vector3 Up;
	vector3 At;
	matrix4 rotationMatrix;

	camera();
	camera(point pos, point grid);
	camera(std::string fileName);
	~camera();

	void setRenderoptions(renderoptions* opt);
	bool render(scene* Scena, picture* Pic, std::string picName);

protected:
	void standardSet();
	renderoptions* proprties;
	void perspectiveRender(scene* Scena, picture* Pic, std::string picName);
	void ortographicRender(scene* Scena, picture* Pic, std::string picName);
	//void pinholeRender(scene* Scena, picture* Pic, std::string picName);
	//void fisheyeRender(scene* Scena, picture* Pic, std::string picName);

	color noneAntialiasing(scene* Scena, picture* Pic, point point1, point point2);
	color linearAntialiasing(scene* Scena, picture* Pic, point point1, point point2, double pixWid, double pixHei);
	color randomAntialiasing(scene* Scena, picture* Pic, point point1, point point2, double pixWid, double pixHei);
	color adaptiveAntialiasing(scene* Scena, picture* Pic, point point1, point point2, double pixWid, double pixHei);

};